package com.sb.registration.component.service.ds;

import java.io.IOException;
import java.util.List;

import com.sb.registration.component.exceptions.DatastoreSystemException;
import com.sb.registration.component.exceptions.UserAlreadyExistsException;
import com.sb.registration.component.exceptions.UserDoesNotExistException;
import com.sb.registration.data.jaxb.gen.Users.User;

/**
 * User Data Source interface to support interaction with user data store. 
 * 
 * @author gautam.amitkumar@gmail.com
 *
 */
public interface UsersDataSource {

	void addUser(User user) throws UserAlreadyExistsException, DatastoreSystemException;
	
	void updateUser(User user) throws DatastoreSystemException, UserDoesNotExistException;
	
	void deleteUser(User user) throws DatastoreSystemException, UserDoesNotExistException;
	
	void deleteUser(String emailId) throws DatastoreSystemException, UserDoesNotExistException;
	
	List<User> getAllUsers();
	
	User getUser(String emailId);
	
	void clearAll() throws IOException, DatastoreSystemException;
	
}
